package com.chpro.scsw.dao;

import com.chpro.scsw.model.ArticleModel;

import java.util.List;

public interface IArticleDao extends BaseDao<ArticleModel> {

	/**
	 * 添加
	 * @param articleModel
	 * @return
	 * @throws Exception
	 */
	public boolean addArticle(ArticleModel articleModel)throws Exception;
	
	/**
	 * 查询所有信息
	 * @return
	 * @throws Exception
	 */
	public List<ArticleModel> queryArticleAll(ArticleModel articleModel) throws Exception;
	
	/**
	 * 根据ID得到文章实体
	 * @param articleId
	 * @return
	 * @throws Exception
	 */
	public ArticleModel queryArticleById(ArticleModel articleId) throws Exception;
	
	/**
	 * 浏览文章 浏览数+1
	 * @param articleModel
	 * @return
	 * @throws Exception
	 */
	public boolean updateArticleById(ArticleModel articleModel) throws Exception;
	
	/**
	 * 最新推荐
	 * @return
	 */
	public List<ArticleModel> queryArticleNew() throws Exception;

    /**
     * 最热
     * @return
     * @throws Exception
     */
    public List<ArticleModel> queryArticleHeat() throws Exception;

    /**
     * 得到总数
     * @param articleModel
     * @return
     * @throws Exception
     */
    public int queryArticleCount(ArticleModel articleModel) throws Exception;
}
